package edu.spec.teacher.model;

import edu.spec.sys.model.User;
import edu.spec.sys.model.enumeration.Status;

import javax.persistence.*;
import java.util.Date;

/**
 * Author       : MadFrog
 * Date         : 2018/10/9 17:15
 * Description  : 签到主题
 */
@Entity
@Table(name = "t_sign_in")
public class SignIn {
    /**
     * 主键
     */
    private Integer id;
    /**
     * 签到标题
     */
    private String title;
    /**
     * 签到的会议开始时间
     */
    private Date startDate;
    /**
     * 签到地点，也就是会议地点
     */
    private String place;
    /**
     * 状态是否启用
     */
    private Status status;
    /**
     * 说明
     */
    private String description;
    /**
     * 创建时间
     */
    private Date createDate;
    /**
     * 创建人
     */
    private User creator;

    public SignIn() {
    }

    @Id
    @GeneratedValue
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Column(name = "start_date")
    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    @Column(name = "create_date")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @ManyToOne
    @JoinColumn(name = "creator_id")
    public User getCreator() {
        return creator;
    }

    public void setCreator(User creator) {
        this.creator = creator;
    }
}
